﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
using WebApiV2.Data.Entity;

namespace WebApiV2.Data
{
   public class Admain3200DbContext :DbContext
    {
        public Admain3200DbContext()
        {

        }

        //重新配置
        protected override void OnConfiguring (DbContextOptionsBuilder optionsBuilder)
        {
            var connectionString = "server=.;database=Admin3200;uid=sa;pwd=123456;";
            optionsBuilder.UseSqlServer(connectionString);
        }

        public DbSet<Users> Users { get; set; }

        public DbSet<Roles> Roles { get; set; }
    }
}
